//package com.faner.fast.rabbitmq.mq;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.stereotype.Component;
//
///**
// * 通过实现 ReturnCallback 接口，启动消息失败返回，比如路由不到队列时触发回调
// */
//@Slf4j
//@Component
//public class ReturnCallbackService implements RabbitTemplate.ReturnCallback {
//
//    @Override
//    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
//        log.error("returnedMessage ===> replyCode={} ,replyText={} ,exchange={} ,routingKey={}", replyCode, replyText, exchange, routingKey);
//    }
//}